<?php
class Article {
	private $title;
	private $content;
	private $publicationDate;
	private $comments;
	private $userName;
	private $articleId;
	public static function newInstance($userName) {
		$article = new Article ( $userName, uniqid (), time () );
		return $article;
	}
	public function __construct($userName, $articleId, $publicationDate) {
		$this->userName = $userName;
		$this->articleId = $articleId;
		$this->publicationDate = $publicationDate;
	}
	public function setContent($content) {
		$this->content = $content;
	}
	public function getContent() {
		return $this->content;
	}
	public function setTitle($title) {
		$this->title = $title;
	}
	public function getTitle() {
		return $this->title;
	}
	public function setUserName($userName) {
		$this->userName = $userName;
	}
	public function getUserName() {
		return $this->userName;
	}
	public function setPublicationDate($publicationDate) {
		$this->publicationDate = $publicationDate;
	}
	public function getPublicationDate() {
		return $this->publicationDate;
	}
	public function getComments() {
		return $this->comments;
	}
	public function getArticleId() {
		return $this->articleId;
	}
	public function addComments($comments) {
		$this->comments = $comments;
	}
}

?>